import request from '@/utils/request'


// 试卷分页列表
export function getExamPaperPage(params) {
  return request({
    url: `/web/dj/examPaper/examPaperPage`,
    method: 'get',
    params,
    jy: true
  })
}

// 当前党员创建试卷能参与的用户
export function getDjtUserList(params) {
  return request({
    url: `/web/dj/examPaper/getDjtUserList`,
    method: 'get',
    params,
    jy: true
  })
}

// 查看试卷具体信息
export function getExamPaperInfo(params) {
  return request({
    url: `/web/dj/examPaper/getInfo`,
    method: 'get',
    params,
    jy: true
  })
}

// 新增与修改试卷
export function addOrEditExamPaper(data) {
  return request({
    url: `/web/dj/examPaper/edit`,
    method: 'post',
    data,
    jy: true
  })
}

// 删除试卷
export function deleteExamPaper(id) {
  return request({
    url: `/web/dj/examPaper/${id}`,
    method: 'delete',
    jy: true
  })
}

// 试卷发布
export function publishExamPaper(data) {
  return request({
    url: `/web/dj/examPaper/publish`,
    method: 'post',
    data,
    jy: true
  })
}